home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 1.toast / pc / sample code / graphics 2d / quickdraw fx / fx.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  2.3 KB  |  112 lines

  1. /*
  2.     File:        FX.h
  3.  
  4.     Contains:    
  5.  
  6.     Written by: Edgar Lee    
  7.  
  8.     Copyright:    Copyright © 1992-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/13/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23. #include <Types.h>
  24. #include <Windows.h>
  25.  
  26. #define        numTItems        8
  27. #define        numAItems        8
  28. #define        numCItems        4
  29. #define        numMItems        3
  30. #define        numDItems        2
  31. #define        numBItems        3
  32. #define        numPItems        2
  33. #define        numLItems        2
  34.  
  35. enum {
  36.     transferID = 1,
  37.     arithmeticID,
  38.     ditherID,
  39.     colorizationID,
  40.     searchProcID,
  41.     paintBucketID,
  42.     lassoID,
  43.     pixelAverageID,
  44.     customID
  45. };
  46.  
  47. typedef    struct {
  48.     Str255    label;
  49.     Rect    rect;
  50. } itemType;
  51.  
  52. typedef struct {
  53.     int        tItem;
  54.     int        aItem;
  55.     int        cItem;
  56.     int        mItem;
  57.     int        dItem;
  58.     int        bItem;
  59.     int        pItem;
  60.     int        lItem;
  61. } itemSettings;
  62.  
  63. extern    WindowPtr        gWindow;
  64. extern    GWorldPtr        gGWorld;
  65. extern    int                gCurrentExample;
  66. extern    itemSettings    settings;
  67.  
  68. extern    itemType    tItem[numTItems];
  69. extern    itemType    aItem[numAItems];
  70. extern    itemType    cItem[numCItems];
  71. extern    itemType    dItem[numDItems];
  72. extern    itemType    mItem[numMItems];
  73. extern    itemType    bItem[numBItems];
  74. extern    itemType    pItem[numPItems];
  75. extern    itemType    lItem[numLItems];
  76.  
  77. void initMac();
  78. void resetItems();
  79. void createWindow();
  80. void createOffscreen();
  81. void defineItems();
  82. void updateWindow();
  83. void drawBackground();
  84. void drawAllItems();
  85. void drawSourceImage();
  86. long drawFXImage();
  87.  
  88. void drawTransferItems();
  89. void drawArithmeticItems();
  90. void drawColorizeItems();
  91. void drawDitherItems();
  92. void drawMappingItems();
  93. void drawDestinationItems();
  94. void drawPaintBucketItems();
  95. void drawLassoToolItems();
  96.  
  97. void drawExampleName();
  98. void drawTime();
  99.  
  100. void drawName();
  101. void drawItem();
  102.  
  103. void drawDeepBox();
  104. void eraseRect();
  105.  
  106. void eventLoop();
  107.  
  108. void setUpMenus();
  109. void adjustMenus();
  110. void setMenuItem();
  111. void handleMenu();
  112.